package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.glsc.ngateway.common.base.utils.ExcelDoubleConverter;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * @author: qiyr
 * @date: 2022/4/25 15:08
 * @description: 风险监测-股票质押回购每日信息（行权融资）实体表
 */
@Data
@Entity
@Table(name = "t_riskdaily_stockrepo_exec")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RiskDailyStockRepoExecId.class)
public class RiskDailyStockRepoExec {
    @Id
    @Column(name = "fl_id")
    @ExcelProperty("序号")
    private Integer id;

    @Column(name = "fc_stock_provider")
    @ExcelProperty("融出方")
    private String stockProvider;

    @Column(name = "fc_fund_provider")
    @ExcelProperty("出资方")
    private String fundProvider;

    @Column(name = "fc_contractid")
    @ExcelProperty("合同编号")
    private String contractId;

    @Column(name = "fc_customer")
    @ExcelProperty("客户名称")
    private String customer;

    @Column(name = "fc_branch")
    @ExcelProperty("分公司/营业部")
    private String branch;

    @Column(name = "fc_department")
    @ExcelProperty("营业部")
    private String department;

    @Column(name = "fc_account")
    @ExcelProperty("资产账号")
    private String account;

    @Column(name = "fc_capaccount")
    @ExcelProperty(value = "资金账号", index = 7)
    private String capAccount;

    @Column(name = "fd_begindate")
    @ExcelProperty("初始交易日期")
    private Date beginDate;

    @Column(name = "fd_enddate")
    @ExcelProperty("约定购回日期")
    private Date endDate;

    @Column(name = "fl_subsisting_days")
    @ExcelProperty("已存续天数（天）")
    private Integer subsistingDays;

    @Column(name = "fl_repo_days")
    @ExcelProperty("合同天数（天）")
    private Integer repoDays;

    @Column(name = "ff_interest_rate")
    @ExcelProperty("利率")
    private Double interestRate;

    @Column(name = "ff_pledge_rate")
    @ExcelProperty("质押率")
    private Double pledgeRate;

    @Column(name = "ff_balance")
    @ExcelProperty("剩余交易金额（万元）")
    private Double balance;

    @Column(name = "ff_init_quantity")
    @ExcelProperty("初始交易数量（万股）")
    private Double initQuantity;

    @Column(name = "ff_cash_supply")
    @ExcelProperty("补充现金（万元）")
    private Double cashSupply;

    @Column(name = "ff_cash_bonus")
    @ExcelProperty(value = "分红现金（万元）", index = 17)
    private Double cashBonus;

    @Column(name = "ff_pledge_supply")
    @ExcelProperty("补充质押（万股）")
    private Double pledgeSupply;

    @Column(name = "ff_share_bonus")
    @ExcelProperty("分红（万股）")
    private Double shareBonus;

    @Column(name = "ff_acc_pledge_quantity")
    @ExcelProperty("累计质押数量（万股）")
    private Double accPledgeQuantity;

    @Column(name = "ff_marketvalue")
    @ExcelProperty(value = "证券市值（万元）", converter = ExcelDoubleConverter.class)
    private Double marketValue;

    @Column(name = "ff_today_repo_amount")
    @ExcelProperty("截至今日购回交易金额（万元）")
    private Double todayRepoAmount;

    @Column(name = "ff_final_repo_amount")
    @ExcelProperty("到期日购回交易金额（万元）")
    private Double finalRepoAmount;

    @Column(name = "fc_secuname")
    @ExcelProperty("标的证券")
    private String secuname;

    @Column(name = "fc_secucode")
    @ExcelProperty("证券代码")
    private String secucode;

    @Column(name = "fc_share_nature")
    @ExcelProperty("股份性质")
    private String shareNature;

    @Column(name = "fd_value_date")
    @ExcelProperty("计息日")
    private Date valueDate;

    @Column(name = "ff_acc_int_pay")
    @ExcelProperty("已支付利息（万元）")
    private Double accIntPay;

    @Column(name = "fc_int_pay_freq")
    @ExcelProperty("付息频率（默认季度）")
    private String intPayFreq;

    @Column(name = "ff_today_act_repo_amount")
    @ExcelProperty("至今实际购回交易金额（万元）")
    private Double todayActRepoAmount;

    @Column(name = "ff_final_act_repo_amount")
    @ExcelProperty("到期实际购回交易金额（万元）")
    private Double finalActRepoAmount;

    @Column(name = "ff_warnig_price")
    @ExcelProperty("警告价格（元）")
    private Double warnigPrice;

    @Column(name = "ff_disposal_price")
    @ExcelProperty("处置价格（元）")
    private Double disposalPrice;

    @Column(name = "ff_warnig_price_setting")
    @ExcelProperty("警告价格定值（元）")
    private Double warnigPriceSetting;

    @Column(name = "ff_disposal_price_setting")
    @ExcelProperty("处置价格定值（元）")
    private Double disposalPriceSetting;

    /**
     * excel文件中该字段可能会是null，故自定义转换器特殊处理非正常值
     */
    @Column(name = "ff_warnig_price_stresstest")
    @ExcelProperty(value = "警告价格压力测试", converter = ExcelDoubleConverter.class)
    private Double warnigPriceStresstest;

    @Column(name = "fc_replenishment_standard")
    @ExcelProperty("补仓标准（默认为平仓线）")
    private String replenishmentStandard;

    @Column(name = "ff_warnig_line")
    @ExcelProperty("警告线")
    private Double warnigLine;

    @Column(name = "ff_disposal_line")
    @ExcelProperty("处置线")
    private Double disposalLine;

    @Column(name = "ff_margin_call_line")
    @ExcelProperty("追保到位线")
    private Double marginCallLine;

    @Column(name = "ff_margin_draw_line")
    @ExcelProperty("提保线")
    private Double marginDrawLine;

    @Column(name = "ff_pv")
    @ExcelProperty("现值")
    private Double pv;

    @Column(name = "fc_agreement_state")
    @ExcelProperty("履约保障状态")
    private String agreementState;

    @Column(name = "ff_today_closeprice")
    @ExcelProperty("本日收盘价（元）")
    private Double todayClosePrice;

    /**
     * excel文件中该字段可能会是null，故自定义转换器特殊处理非正常值
     */
    @Column(name = "ff_today_closeprice_unadj")
    @ExcelProperty(value = "本日收盘价（元）(不复权）", converter = ExcelDoubleConverter.class)
    private Double todayClosePriceUnadj;

    @Column(name = "fd_bizdate")
    // 由于该列列名为动态变化的日期，所以用索引的方式匹配获得值
    @ExcelProperty(index = 46)
    private Date bizDate;

    @Column(name = "fd_circulation")
    @ExcelProperty("限售股应解禁时间")
    private Date circulation;

    @Column(name = "fc_market")
    @ExcelProperty("证券市场类型")
    private String market;

    @Column(name = "fc_is_borrow_and_return")
    @ExcelProperty("是否借新还旧")
    private String isBorrowAndReturn;

    @Column(name = "ff_start_amount")
    @ExcelProperty("初始交易金额")
    private Double startAmount;

    @Column(name = "fc_sys_classify")
    @ExcelProperty("系统分类")
    private String sysClassify;

    @Id
    @Column(name = "fd_date")
    @ExcelIgnore
    private Date date;

    public String getIsBorrowAndReturn() {
        return isBorrowAndReturn;
    }

    public void setIsBorrowAndReturn(String isBorrowAndReturn) {
        this.isBorrowAndReturn = isBorrowAndReturn;
    }

    public Double getStartAmount() {
        return startAmount;
    }

    public void setStartAmount(Double startAmount) {
        this.startAmount = startAmount;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStockProvider() {
        return stockProvider;
    }

    public void setStockProvider(String stockProvider) {
        this.stockProvider = stockProvider;
    }

    public String getFundProvider() {
        return fundProvider;
    }

    public void setFundProvider(String fundProvider) {
        this.fundProvider = fundProvider;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public String getBranch() {
        return branch;
    }

    public void setBranch(String branch) {
        this.branch = branch;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getCapAccount() {
        return capAccount;
    }

    public void setCapAccount(String capAccount) {
        this.capAccount = capAccount;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getSubsistingDays() {
        return subsistingDays;
    }

    public void setSubsistingDays(Integer subsistingDays) {
        this.subsistingDays = subsistingDays;
    }

    public Integer getRepoDays() {
        return repoDays;
    }

    public void setRepoDays(Integer repoDays) {
        this.repoDays = repoDays;
    }

    public Double getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(Double interestRate) {
        this.interestRate = interestRate;
    }

    public Double getPledgeRate() {
        return pledgeRate;
    }

    public void setPledgeRate(Double pledgeRate) {
        this.pledgeRate = pledgeRate;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public Double getInitQuantity() {
        return initQuantity;
    }

    public void setInitQuantity(Double initQuantity) {
        this.initQuantity = initQuantity;
    }

    public Double getCashSupply() {
        return cashSupply;
    }

    public void setCashSupply(Double cashSupply) {
        this.cashSupply = cashSupply;
    }

    public Double getCashBonus() {
        return cashBonus;
    }

    public void setCashBonus(Double cashBonus) {
        this.cashBonus = cashBonus;
    }

    public Double getPledgeSupply() {
        return pledgeSupply;
    }

    public void setPledgeSupply(Double pledgeSupply) {
        this.pledgeSupply = pledgeSupply;
    }

    public Double getShareBonus() {
        return shareBonus;
    }

    public void setShareBonus(Double shareBonus) {
        this.shareBonus = shareBonus;
    }

    public Double getAccPledgeQuantity() {
        return accPledgeQuantity;
    }

    public void setAccPledgeQuantity(Double accPledgeQuantity) {
        this.accPledgeQuantity = accPledgeQuantity;
    }

    public Double getMarketValue() {
        return marketValue;
    }

    public void setMarketValue(Double marketValue) {
        this.marketValue = marketValue;
    }

    public Double getTodayRepoAmount() {
        return todayRepoAmount;
    }

    public void setTodayRepoAmount(Double todayRepoAmount) {
        this.todayRepoAmount = todayRepoAmount;
    }

    public Double getFinalRepoAmount() {
        return finalRepoAmount;
    }

    public void setFinalRepoAmount(Double finalRepoAmount) {
        this.finalRepoAmount = finalRepoAmount;
    }

    public String getSecuname() {
        return secuname;
    }

    public void setSecuname(String secuname) {
        this.secuname = secuname;
    }

    public String getSecucode() {
        return secucode;
    }

    public void setSecucode(String secucode) {
        this.secucode = secucode;
    }

    public String getShareNature() {
        return shareNature;
    }

    public void setShareNature(String shareNature) {
        this.shareNature = shareNature;
    }

    public Date getValueDate() {
        return valueDate;
    }

    public void setValueDate(Date valueDate) {
        this.valueDate = valueDate;
    }

    public Double getAccIntPay() {
        return accIntPay;
    }

    public void setAccIntPay(Double accIntPay) {
        this.accIntPay = accIntPay;
    }

    public String getIntPayFreq() {
        return intPayFreq;
    }

    public void setIntPayFreq(String intPayFreq) {
        this.intPayFreq = intPayFreq;
    }

    public Double getTodayActRepoAmount() {
        return todayActRepoAmount;
    }

    public void setTodayActRepoAmount(Double todayActRepoAmount) {
        this.todayActRepoAmount = todayActRepoAmount;
    }

    public Double getFinalActRepoAmount() {
        return finalActRepoAmount;
    }

    public void setFinalActRepoAmount(Double finalActRepoAmount) {
        this.finalActRepoAmount = finalActRepoAmount;
    }

    public Double getWarnigPrice() {
        return warnigPrice;
    }

    public void setWarnigPrice(Double warnigPrice) {
        this.warnigPrice = warnigPrice;
    }

    public Double getDisposalPrice() {
        return disposalPrice;
    }

    public void setDisposalPrice(Double disposalPrice) {
        this.disposalPrice = disposalPrice;
    }

    public Double getWarnigPriceSetting() {
        return warnigPriceSetting;
    }

    public void setWarnigPriceSetting(Double warnigPriceSetting) {
        this.warnigPriceSetting = warnigPriceSetting;
    }

    public Double getDisposalPriceSetting() {
        return disposalPriceSetting;
    }

    public void setDisposalPriceSetting(Double disposalPriceSetting) {
        this.disposalPriceSetting = disposalPriceSetting;
    }

    public Double getWarnigPriceStresstest() {
        return warnigPriceStresstest;
    }

    public void setWarnigPriceStresstest(Double warnigPriceStresstest) {
        this.warnigPriceStresstest = warnigPriceStresstest;
    }

    public String getReplenishmentStandard() {
        return replenishmentStandard;
    }

    public void setReplenishmentStandard(String replenishmentStandard) {
        this.replenishmentStandard = replenishmentStandard;
    }

    public Double getWarnigLine() {
        return warnigLine;
    }

    public void setWarnigLine(Double warnigLine) {
        this.warnigLine = warnigLine;
    }

    public Double getDisposalLine() {
        return disposalLine;
    }

    public void setDisposalLine(Double disposalLine) {
        this.disposalLine = disposalLine;
    }

    public Double getMarginCallLine() {
        return marginCallLine;
    }

    public void setMarginCallLine(Double marginCallLine) {
        this.marginCallLine = marginCallLine;
    }

    public Double getMarginDrawLine() {
        return marginDrawLine;
    }

    public void setMarginDrawLine(Double marginDrawLine) {
        this.marginDrawLine = marginDrawLine;
    }

    public Double getPv() {
        return pv;
    }

    public void setPv(Double pv) {
        this.pv = pv;
    }

    public String getAgreementState() {
        return agreementState;
    }

    public void setAgreementState(String agreementState) {
        this.agreementState = agreementState;
    }

    public Double getTodayClosePrice() {
        return todayClosePrice;
    }

    public void setTodayClosePrice(Double todayClosePrice) {
        this.todayClosePrice = todayClosePrice;
    }

    public Double getTodayClosePriceUnadj() {
        return todayClosePriceUnadj;
    }

    public void setTodayClosePriceUnadj(Double todayClosePriceUnadj) {
        this.todayClosePriceUnadj = todayClosePriceUnadj;
    }

    public Date getBizDate() {
        return bizDate;
    }

    public void setBizDate(Date bizDate) {
        this.bizDate = bizDate;
    }

    public Date getCirculation() {
        return circulation;
    }

    public void setCirculation(Date circulation) {
        this.circulation = circulation;
    }

    public String getMarket() {
        return market;
    }

    public void setMarket(String market) {
        this.market = market;
    }

    public String getSysClassify() {
        return sysClassify;
    }

    public void setSysClassify(String sysClassify) {
        this.sysClassify = sysClassify;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
